import { asyncRoutes, constantRoutes } from '@/router'
const state = {
  routes: [...constantRoutes, ...asyncRoutes]
}
const mutations = {
  // 动态添加路由
  generRoutes(state, newRoutes) {
    state.routes = [...constantRoutes, ...newRoutes]
  }
}
const actions = {

}
const getters = {
  routes(state) {
    return state.routes
  }

}
export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
